<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    let person = {
        name:'张三',
        age:18
    };

    let p = new Proxy(person, {
        get(target, propName) {
            return Reflect.get(target, propName);
        },
        set(target, propName, value) {
            console.log('set');
            Reflect.set(target, propName, value);
        },
        deleteProperty(target, propName) {
            return Reflect.deleteProperty(target, propName);
        },
    });

    let name = p.name;
</script>
</html>